/*
 * @Description: 
 * @version: 
 * @Author: cy
 * @Date: 2022-04-28 09:29:35
 * @LastEditors: cy
 * @LastEditTime: 2022-04-28 13:48:51
 */
// instanceof原理实现
const instanceOf = (A, B) => {
    let p = A;
    while(p) {
        if (p === B.prototype) {
            return true;
        }
        // 遍历A的原型链
        p = p.__proto__;
    }
    return false;
}
var bl = instanceOf([], Array);
var b2 = instanceOf([], Object);
debugger;